package com.grf.es.highlevelrest;

import org.apache.http.HttpHost;
import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestHighLevelClient;

public class Client {

//	RestHighLevelClient client = new RestHighLevelClient(
//	        RestClient.builder(new HttpHost("192.168.1.101", 9200, "http")));
//	
	/**
	 * 获取客户端
	 * @return
	 */
	public static RestHighLevelClient getClient() {
		RestHighLevelClient client = new RestHighLevelClient(
			RestClient.builder(new HttpHost("192.168.1.101", 9200, "http")).build());
		return client;
	}
	
}
